package icasue.tools.sqlhelper.common;

import java.time.format.DateTimeFormatter;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/9/27 下午5:15
 * @UpdateDate:
 * @Description:
 */
public class Const {
    // 符号域
    public static final String $REGEX_HEAD = "^";
    public static final String $DOT = ",";
    public static final String $MONEY = "$";
    public static final String $STAR = "*";
    public static final String $AT = "@";
    public static final String $QUE = "?";
    public static final String $PERCENT = "%";
    public static final String $SEC = "'";
    public static final String $STRICT = "`";
    public static final String $DOU_SEC = "\"";
    public static final String $SPACE = " ";
    public static final String $EMPTY = "";
    public static final String $NEW_LINE = "\n";
    public static final String $GTE = ">=";
    public static final String $LTE = "<=";
    public static final String $GT = ">";
    public static final String $LT = "<";
    public static final String $EQ = "=";
    public static final String $SPOT = ".";
    public static final String $PATH = "/";
    public static final String $LINE_BOTTOM = "_";
    public static final String $BRACKETS_SMALL_LEFT = "(";
    public static final String $BRACKETS_SMALL_RIGHT = ")";

    // 关键字域
    public static final String INSERT = "insert";
    public static final String SELECT = "select";
    public static final String UPDATE = "update";
    public static final String DELETE = "delete";

    public static final String AND = "and";
    public static final String OR = "or";
    public static final String FROM = "from";
    public static final String NULL = "null";
    public static final String WHERE = "where";
    public static final String VALUES = "values";
    public static final String INTO = "into";
    public static final String IGNORE = "ignore";
    public static final String REPLACE = "replace";
    public static final String AS = "as";
    public static final String SET = "set";
    public static final String LIKE = "like";
    public static final String LIMIT = "limit";
    public static final String COUNT = "count";
    public static final String DISTINCT = "distinct";
    public static final String ORDER_BY = "order by";
    public static final String ASC = "asc";
    public static final String DESC = "desc";
    public static final String ON_DUPLICATE_KEY_UPDATE = "on duplicate key update";


    public static final String _EQ_ = " = ";
    public static final String _LIKE = " like ";
    public static final String _BETWEEN_ = " between ";
    public static final String _IN_ = " in ";
    public static final String _NOT_IN_ = " not in ";
    public static final String _IS_NULL = " is null";
    public static final String _IS_NOT_NULL = " is not null";

    // 条件域
    public static final String SQL_CONDITION_TRUE = "1 = 1";


    // 自定义域
    public static final String USER_REFERENCE = "@reference";
    public static final String DATE_FORMAT = "%s-%02d-%02d %02d:%02d:%02d";
    public static final DateTimeFormatter DF = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
}
